name_list = ["Tom", "Wesley", "Jack"]

# -1 反向索引获取元素
print(name_list[-1])

# 查找元素下标
index = name_list.index("Wesley")
print(index)
# 插入元素
name_list.insert(0, "Annie")
print(name_list)

list2 = ["Fe", "Annie"]
# 追加一批元素
name_list.extend(list2)
print(name_list)

# 删除元素
del name_list[0]
print(name_list)

# 取出元素
pop = name_list.pop(0)
print(pop)
# 统计指定元素数量
print(f"Wesley数量: {name_list.count('Wesley')}")
print(f"列表数量: {len(name_list)}")

